package jsqlite;

/* loaded from: classes2.dex */
public class Backup {
    protected long handle = 0;

    private native int _pagecount() throws Exception;

    private native int _remaining() throws Exception;

    private native boolean _step(int i) throws Exception;

    private static native void internal_init();

    protected native void _finalize() throws Exception;

    protected void finish() throws Exception {
        synchronized (this) {
            _finalize();
        }
    }

    protected void finalize() {
        synchronized (this) {
            try {
                _finalize();
            } catch (Exception unused) {
            }
        }
    }

    public boolean step(int i) throws Exception {
        boolean _step;
        synchronized (this) {
            _step = _step(i);
        }
        return _step;
    }

    public void backup() throws Exception {
        synchronized (this) {
            _step(-1);
        }
    }

    public int remaining() throws Exception {
        int _remaining;
        synchronized (this) {
            _remaining = _remaining();
        }
        return _remaining;
    }

    public int pagecount() throws Exception {
        int _pagecount;
        synchronized (this) {
            _pagecount = _pagecount();
        }
        return _pagecount;
    }

    static {
        internal_init();
    }
}
